package com.spring.componentAnnotation;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.spring.componentAnnotation.Boss;

public class UnitTest {

	private static ApplicationContext ctx;
	
	static {
		String[] locations = {"springAnnotationConfig/componentAnnotation.xml"};
		ctx = new ClassPathXmlApplicationContext(locations);
	}

	@Test
	public void test1() {
		Boss boss = (Boss) ctx.getBean("boss");
		System.out.println("[test1] " + boss);
	}
	
}
